home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / networking / amitcp / syncro1_41.lha / SynCro1_41 / SynCro.DOC < prev    next >
Encoding:
Text File  |  1995-02-10  |  14.1 KB  |  334 lines

  1.  
  2.                             SynCro v1.41
  3.  
  4.                       © 1994, 1995 Simon Dainty
  5.  
  6.                 Remote time-synchronization for AmiTCP
  7.  
  8. ======================================================================
  9.   Contents:                                             SynCro v1.41
  10. ======================================================================
  11.  
  12.   Introduction: What is...?                                      1.0
  13.  
  14.   SynCro:                                                        2.0
  15.     Installation ............................................... 2.1
  16.     How to...? ................................................. 2.2
  17.     Problems, problems ......................................... 2.3
  18.  
  19.   Legalities... damn:                                            3.0
  20.  
  21.   ...Forty Two:                                                  4.0
  22.     A word in your shell-like .................................. 4.1
  23.     Past, present and future ................................... 4.2
  24.  
  25. ======================================================================
  26.   Introduction: What is...?                              Chapter 1.0
  27. ======================================================================
  28.  
  29. There exists, as a  part of the  AmiTCP package, a mixed DOS and AREXX
  30. script named SynClock that allows you  to set your local time and date
  31. to that of  a remote  Internet-connected system.  SynCro  performs the
  32. exact same function as the  original  SynClock, but with one  distinct
  33. advantage: SynCro  was  written  in C; SynCro is  a stand-alone binary
  34. executable that can be made resident.
  35.  
  36.   SynCro has been fully tested with AmiTCP version 3.x beta, KickStart
  37. version 3.0 and  bsdsocket.library version 2; but it should work  with
  38. any version of the AmiTCP distribution and KickStart 2.0 and above (at
  39. least).  I'll be happy  to know of any problems  people may experience
  40. with regard to running  SynCro on anything  other than what I was able
  41. to test it on.
  42.  
  43. ======================================================================
  44.   SynCro:                                                Chapter 2.0
  45. ======================================================================
  46.  
  47. On startup, SynCro  will first perform  a check to see if AmiTCP is up
  48. and running.  Next, SynCro will attempt to access the 'time' socket of
  49. the  site that you have passed it as an argument at the Shell.  If the
  50. attempt  at accessing  the  port is a success  then everything else is
  51. plain sailing.
  52.  
  53. ----------------------------------------------------------------------
  54.   SynCro: Installation.                                  Chapter 2.1
  55. ----------------------------------------------------------------------
  56.  
  57. SynCro is nothing  more  than a  standard AmigaDOS Shell  command, and
  58. with that it  can be placed anywhere you  deem fit.  Probably the best
  59. location to copy SynCro to is AmiTCP's 'bin' directory, if that is how
  60. your  AmiTCP hierarchy  is configured.  Otherwise  the C: directory is
  61. more than  adequate.  Placing SynCro somewhere within your path offers
  62. the obvious benefits.
  63.  
  64.   Alternatively, you may  wish to  make SynCro  resident.  This can be
  65. achieved by the normal method of using AmigaDOS's  'Resident' command.
  66. Making  SynCro  resident  isn't all  that  big  a deal  though, unless
  67. you're likely to be setting your machine time on a very regular basis.
  68. Still, the option is there if you ever need it.
  69.  
  70. In order to  correctly calculate the current  time, the GMT offset for
  71. your local site must be set via the Local preferences executable.  All
  72. you need do is click on the image of your country, as displayed on the
  73. map of  the world, and the local  Time Zone relative  to GMT  will  be
  74. modified to reflect  your offset.  Store the  new local  time zone  by
  75. clicking on the Save gadget.
  76.  
  77.   If no local GMT offset is configured, SynCro will default to GMT.
  78.  
  79. With respect  to stack requirement, SynCro should  work perfectly well
  80. with the default Shell stack size of 4096 bytes.
  81.  
  82. ----------------------------------------------------------------------
  83.   SynCro: How to...?                                     Chapter 2.2
  84. ----------------------------------------------------------------------
  85.  
  86. SynCro requires at least one argument in order to function  correctly:
  87. Either the  Fully Qualified Domain Name, or the IP address, of a site.
  88. All of  the valid command line arguments  that SynCro will  accept are
  89. listed below.
  90.  
  91.     SITE    - This argument is the only argument required by SynCro in
  92.               order for it to perform the desired task.  Any valid  IP
  93.               address or FQDN is acceptable here.
  94.  
  95.     SAVE    - If specified, SynCro  will save  the received  time  and
  96.               date to  a battery-backed clock, if such a clock exists.
  97.               If SynCro is  unable to access the battery-backed clock,
  98.               you may be notified.
  99.  
  100.     IGNORE  - SynCro will default to setting the local system clock to
  101.               that  of the remote time and date.  Calling  SynCro with
  102.               the IGNORE  switch set  will result in  no changes being
  103.               made to the local system time at all.
  104.  
  105.     QUIET   - Just as  it says, don't bother displaying any  output to
  106.               the  stdout.  By "any," I  mean  that  both the received
  107.               date and time, as well as any errors that may occur will
  108.               be suppressed.
  109.  
  110.   With exception  to the first obligatory  argument (the site), any of
  111. the three  remaining arguments may be supplied or ignored at the users
  112. discretion.  None of the arguments are mutually exclusive.
  113.  
  114.   What follows are several examples of SynCro usage:
  115.  
  116.   1) Examine  the current time of your  local machine (read the AmiTCP
  117.      documentation for  information regarding 'localhost'), but do not
  118.      set the system time to that of the received time.
  119.  
  120.      Shell> SynCro localhost IGNORE
  121.  
  122.   2) Set both the  system clock and  the internal battery-backed clock
  123.      to the time and date of the remote machine 'my.fave.remote.host'.
  124.      Any output will be suppressed.
  125.  
  126.      Shell> SynCro my.fave.remote.host SAVE QUIET
  127.  
  128.   3) Set the battery-backed clock time and  date to that of the remote
  129.      machine, but  don't set the  local system  clock.  I cannot think
  130.      of any  real reasons for wanting  to do this.
  131.  
  132.      Shell> SynCro my.fave.remote.host SAVE IGNORE
  133.  
  134.        If, after  receiving the  remote time and date, you wish to set
  135.      the  local time and  date, then it is simply a  matter of typing:
  136.      SETCLOCK LOAD at the Shell prompt.
  137.  
  138.   4) Set the  local system time and  date to that of the remote  site,
  139.      but suppress all output.  Nothing will be written to the battery-
  140.      backed clock.
  141.  
  142.      Shell> SynCro 255.255.255.255 QUIET
  143.  
  144. ----------------------------------------------------------------------
  145.   SynCro: Problems, problems.                            Chapter 2.3
  146. ----------------------------------------------------------------------
  147.  
  148. If, for  some  reason, SynCro is unable to  perform its  duty - if the
  149. remote host  can't be found for example, a specific  return code shall
  150. be met.  The value of  the return code relates  directly to a specific
  151. error within SynCro, these errors are listed below:
  152.  
  153.     21 - Incorrect command line arguments were passed.
  154.     22 - SynCro couldn't open the bsdsocket.library.
  155.     23 - SynCro failed to connect to the given remote host.
  156.     24 - SynCro  was  unable to  connect  to the 'time' socket  of the
  157.          remote host.
  158.     25 - For some reason, the battery-backed clock could not be found.
  159.  
  160. The  returning of  an error-specific return code  was a new feature of
  161. SynCro, for version 1.1.
  162.  
  163. ======================================================================
  164.   Legalities... damn:                                    Chapter 3.0
  165. ======================================================================
  166.  
  167. You use  SynCro completely  at your *own* risk, no  warranty is either
  168. expressed or implied.  I cannot (and will not) be held responsible for
  169. any damages caused by SynCro, no matter what the circumstance.  Either
  170. use this program  or ignore it, but don't blame me for  *any* unwanted
  171. results.  I've probably  spent more time  testing SynCro than actually
  172. coding it and  not  once has it misbehaved.  Hopefully  you too should
  173. experience a care-free service life.
  174.  
  175.   Although SynCro is freely  distributable, it still remains copyright
  176. 1994-5 Simon P. Dainty.  SynCro is definitely not Public Domain, it is
  177. freely distributable FreeWare - there is a difference.  Anyone wishing
  178. to obtain a copy has the right to a copy, for little or no charge.
  179.  
  180.   Whilst the continued distribution of SynCro is the author's goal, he
  181. hopes that you will conform to the following agreement:
  182.  
  183.   1) No files  are added to, or removed from, the archive with respect
  184.      to the original distribution, and no  files are modified relative
  185.      to their original state without the author's permission.
  186.  
  187.   2) No charge, other than the cost of media duplication, may be asked
  188.      for this package unless the situation of that charge falls within
  189.      item three (below).
  190.  
  191.   3) If  this package is to be  included as a part  of a commercial or
  192.      ShareWare  (or  variant) distribution, or magazine coverdisk, the
  193.      author would appreciate some form  of prior notification.  Aminet
  194.      CD-ROM, or any "Public Domain" CD-ROM distribution is exempt from
  195.      the above requirement.
  196.  
  197. If you  are a non-conformist, at least  make the  effort to appreciate
  198. what I've written above. =o)  Above all though, have fun.
  199.  
  200. ======================================================================
  201.   ...Forty Two:                                          Chapter 4.0
  202. ======================================================================
  203.  
  204. SynCro was  written in C, with the aid of Matt Dillon's DICE C package
  205. (version 2.07.57R) and  was  tested on a 3.0-based  AGA Amiga, running
  206. AmiTCP v3.xbeta and bsdsocket.library version 2.
  207.  
  208.   Even though SynCro  is freely  distributable, I'd like  you to think
  209. of it as "World-a-Ware".  If you find  SynCro to be useful, or you use
  210. SynCro for any  period of time, please do  a little something to  help
  211. the  environment of OUR home.  We are  all  ultimately responsible for
  212. the world that we live in, and we are equally responsible for those we
  213. share  it  with.  We only have  the one copy  of Earth, and  without a
  214. back-up...
  215.  
  216. ----------------------------------------------------------------------
  217.   ...Forty Two: A word in your shell-like.               Chapter 4.1
  218. ----------------------------------------------------------------------
  219.  
  220. With respect to bug fixes, bug  reports, general  updates (if any) and
  221. pure talkability, I can  be contacted at any  of the addresses  listed
  222. below.  You will also find me lurking in most all of the Amiga related
  223. Usenet groups, specifically the  comp.sys.amiga.* groups as  well as a
  224. good few Amiga specific FidoNet and AmigaNet echos.
  225.  
  226.   Internet mailbox:
  227.  
  228.     syncro@ancient.demon.co.uk (Simon Dainty)
  229.  
  230.   Or,
  231.  
  232.     izzy@ancient.demon.co.uk (Simon Dainty)
  233.  
  234.   FidoNet and AmigaNet, via Dox's Amiga BBS (+44 01943 850340):
  235.  
  236.     2:250/320.3 (Simon Dainty)
  237.     39:138/14.3    "     "
  238.  
  239.   Snail mail:
  240.  
  241.     25, Victor Road,
  242.     Heaton,
  243.     Bradford,
  244.     West Yorkshire,
  245.     England,
  246.     BD9 4QN.
  247.  
  248.   Electronic mail is my most preferred form of communication.
  249.  
  250.   SYL,
  251.  
  252.        Si.
  253.  
  254.  
  255.      "Breakin'  outta school an' we were  kickin' hard.  A lotta
  256.       good dreams an' a lotta false starts; We swore we wouldn't
  257.       get old before our time..." 
  258.                                   - Little Angels.
  259.  
  260. ----------------------------------------------------------------------
  261.   ...Forty Two: Past, present and future.                Chapter 4.2
  262. ----------------------------------------------------------------------
  263.  
  264.  29-Nov-94:  
  265.  
  266.  v1.0  - Initial release with no know bugs.  Limited distribution.
  267.  
  268.  02-Dec-94:
  269.  
  270.  v1.1  - Optimized executable compilation by utilizing inline library
  271.          calls.  Shaved off around 200 bytes from the binary.  
  272.  
  273.        - SynCro will return a specific code  in the event of an error.
  274.          Refer to chapter 2.3 for more information.
  275.  
  276.  02-Jan-95:
  277.  
  278.  v1.2  - Optimized executable size.  Now down to 4.8K.
  279.  
  280.        - Modified the ordering of the error-specific return codes into
  281.          something a little more logical.  Please refer to chapter 2.3
  282.          with respect to those changes.
  283.  
  284.        - Fixed a bug where SynCro would complain about an invalid FQDN
  285.          argument, when the argument was indeed valid.
  286.  
  287.  28-Jan-95:
  288.  
  289.  v1.3  - Optimized executable size.  Now down to 3.5K.
  290.  
  291.        - SynCro now goes directly  through the "bsdsocket.library", as
  292.          opposed to  earlier versions that used the TCP: device.  This
  293.          affords the user several benefits:
  294.  
  295.            * Not restricted to only giving an FQDN as the reference to
  296.              a remote site; SynCro will also accept an IP address.
  297.  
  298.            * No need to  mount the TCP: device if  SynCro was the only
  299.              program that needed it.
  300.  
  301.            * A CONTROL-C from  the Shell that SynCro  was started from
  302.              will now stop it dead in its tracks.
  303.  
  304.        - Once more, several modifications have been made to the error-
  305.          specific return codes.  Please  refer to chapter 2.3 for more
  306.          information.
  307.  
  308.  04-Feb-95:
  309.  
  310.  v1.4  - Limited tester release.
  311.  
  312.        - Problems arose when SynCro was used with the Multilink AmiTCP
  313.          and RS225  emulator (in beta).  Thanks to Osma Ahvenlampi for
  314.          pointing the deficiency out.
  315.  
  316.        - If SynCro was unable to resolve the remote host, AmiTCP would
  317.          not shutdown correctly.  This  was a problem with version 1.3
  318.          of SynCro  not closing the  bsdsocket.library when it  should
  319.          have done.  Any other time and it would have worked fine.  My
  320.          fault entirely - it is now fixed.
  321.  
  322.        - Minor changes to the error-specific return codes. Again.
  323.  
  324.  09-Feb-95:
  325.  
  326.  v1.41 - Modified  the  way the remote time is  processed.  Instead of
  327.          relying on the location-specific  time string as received via
  328.          the 'daytime' port, SynCro  now goes through the 'time' port,
  329.          and calculates the  current time by  processing the number of
  330.          seconds since midnight of January the 1st 1900.
  331.  
  332.        - Because of the  above changes, SynCro now  requires the local
  333.          system's GMT offset to be set within the Locale preferences.
  334.